<?php

// does this override xhgui's config/config.default.php entirely, or just
// individual items?
return array(
    // 'debug' => false,
    // 'mode' => 'development',
    // Can be either mongodb or file.
    /*
    'save.handler' => 'file',
    'save.handler.filename' => dirname(__DIR__) . '/cache/' . 'xhgui.data.' . microtime(true) . '_' . substr(md5($url), 0, 6),
    */
    //'save.handler' => 'mongodb',
    // Needed for file save handler. Beware of file locking. You can adujst this file path
    // to reduce locking problems (eg uniqid, time ...)
    //'save.handler.filename' => __DIR__.'/../data/xhgui_'.date('Ymd').'.dat',

    {% if inventory_hostname == groups['app_servers'][0] %}
    'db.host' => 'mongodb://127.0.0.1:27017',
    {% else %}
    // mongodb server is on first app server
    'db.host' => 'mongodb://{{ groups["app_servers"][0] }}:27017',
    {% endif %}

    //'db.db' => 'xhprof',
    // Allows you to pass additional options like replicaSet to MongoClient.
    // 'username', 'password' and 'db' (where the user is added)
    //'db.options' => array(),
    //'templates.path' => dirname(__DIR__) . '/src/templates',
    //'date.format' => 'M jS H:i:s',
    //'detail.count' => 6,
    //'page.limit' => 25,
    // Profile 1 in 100 requests.
    // You can return true to profile every request.
    'profiler.enable' => function() {
        //return rand(1, 100) === 42;
    	return true;
    },
    // 'profiler.simple_url' => function($url) {
    //     return preg_replace('/\=\d+/', '', $url);
    // }
);
